<h2>Upcoming appointments</h2>
<script type="text/javascript">
    $('.scrollTable').dataTable({ "sPaginationType": "full_numbers", "bRetrieve": true });
</script>
    <table class="scrollTable">
        <thead>
            <tr>
                <th>Date</th>
                <th>Location</th>
                <th>iStip</th>
                <th>Type</th>
            </tr>
        </thead>
        <tbody>
            <? for($i=1; $i<=20; $i++) {
                if($i % 2) {
                    echo '<tr>';
                    echo '<td>04-12-2011 12:45</td>';
                    echo '<td>McDonalds</td>';
                    echo '<td>Gijsbert v. Dalen</td>';
                    echo '<td>Lunch</td>';
                    echo '</tr>';
                }
                else {
                    echo '<tr>';
                    echo '<td>16-05-2011 14:00</td>';
                    echo '<td>Padualaan 8 FEM HU';
                    echo '<td>Joan Chiang</td>';
                    echo '<td>Presentation</td>';
                    echo '</tr>';
                }
            } ?>
        </tbody>
    </table>

<div class="appointments">
     <div class="appointmentField">
            <label>Subject:</label>
            <input type="text" name="appointmentSubject" id="appointmentSubject">
                
            <label>Location:</label>
            <input type="text" name="appointmentLocation" id="appointmentLocation">
        </div>

        <div class="appointmentField">
            <label>Date & time:</label>
            <input type="text" name="appointmentDateTime" id="appointmentDateTime">
        </div>

        <div class="appointmentField">
            <label>Status:</label>
            <select name="appointmentStatus" id="appointmentStatus">
                <option value="Invite"></option>
                <option value="Reject"></option>
                <option value="Pending"></option>
            </select>
        </div>
        
        <div class="appointmentField">
            <label>Description:</label>
            <textarea cols="5" rows="6" name="appointmentDesc" class="textArea" id="appointmentDesc"></textarea>
        </div>

        <div class="appointmentInvite">
            <label>Invite:</label>
            <select name="appointmentInvite" id="appointmentInvite">
                <option value="1">Jan Jansen</option>
                <option value="2">Wesley Verhoek</option>
                <option value="3">Maarten Stekelenburg</option>
            </select>
            <input type="button" class="button" name="appointmentAddInvite" value="+"/>

        </div>
        
        <div class="errorSmall"></div> 
        <div class="successSmall"></div>
        <div class="formButton">
            <input type="button" class="button" name="cancelAddAppointment" id="hideAddAppointmentForm" value="Cancel"/>
            <input type="submit" class="button" name="addAppointment" id="addAppointment" value="Save"/>
            <script type="text/javascript">
                $('#addAppointment').click(addAppointment());
            </script>
        </div>
</div>